<div class="fragment">
  <button
    class="mobile-settings-button"
    v-on:click="openModal"
    aria-label="Settings"
    v-bind="buttonProps"></button>

  <app-modal title="Settings" ref="modal">
    <form class="modal-body form-aligned" v-on:submit="$event.preventDefault()">
      <fieldset>
        <legend>Main</legend>
        <div class="form-line">
          <label v-bind:for="`mobile-${id}-language`">Language:</label>
          <app-select-language v-model="options.language"
                               v-bind:id="`mobile-${id}-language`"
                               v-bind:use-aria-label="false"></app-select-language>
        </div>
        <div class="form-line">
          <label v-bind:for="`mobile-${id}-branch`">Branch:</label>
          <app-select-branch v-model="options.branch"
                             v-bind:branches="branches"
                             v-bind:language="options.language"
                             v-bind:id="`mobile-${id}-branch`"
                             v-bind:use-aria-label="false"></app-select-branch>
        </div>
        <app-section-branch-details v-bind:header="false" v-bind:branch="options.branch"></app-section-branch-details>
        <div class="form-line">
          <label v-bind:for="`mobile-${id}-target`">Output:</label>
          <app-select-target v-model="options.target"
                             v-bind:id="`mobile-${id}-target`"
                             v-bind:use-aria-label="false"></app-select-target>
        </div>
        <div class="form-line">
          <label v-bind:for="`mobile-${id}-mode`">Build:</label>
          <app-select-mode v-model="options.release"
                           v-bind:id="`mobile-${id}-mode`"
                           v-bind:use-aria-label="false"></app-select-mode>
        </div>
      </fieldset>

      <fieldset>
        <legend>Other</legend>
        <div class="form-line">
          <slot name="gist-manager"></slot>
        </div>
        <div class="form-line">
          <app-cm6-preview-manager></app-cm6-preview-manager>
        </div>
      </fieldset>
    </form>
  </app-modal>
</div>